<template>
	<view class="empty" :style="{position:position,top:top}">
		<view class="nonews">
			<image class="nonewsimg" :src="imgUrl+'zanwuxiaoxi.gif'" mode="widthFix">
			<view class="nonewstext">
				{{title}}
			</view>
			<view class="nonewsbtn" v-if="btnTxt" @click="emptyBtn">
				{{btnTxt}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			title:{
				type:String,
				default:'还没有相关订单',
			},
			btnTxt:{
				type:String,
				default:'',
			},
			position:{
				type:String,
				default:'fixed',
			}, 
			top:{
				type:String,
				default:'',
			},
		},
		components: {
			
		},
		data() {
			return {
				imgUrl:this.$apiFun.imgUrl,
				host:this.$apiFun.host,
			}
		},
		onLoad() {
		},
		methods: {
			emptyBtn(){
				this.$emit('emptyBtn')
			},
		},
		onReachBottom() {
			
		}
	}
</script>

<style scoped lang="less">
	page{
		width: 100%;
		height: 100%;
		/* 暂无列表显示 */
		.empty{
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;
			display: flex;
			margin-bottom: 120rpx;
			box-sizing: border-box;
			.nonews{
				text-align: center;
				margin: auto;
				.nonewsimg{
					margin:auto;
					width: 600rpx;
					height: 200rpx;
					display: block;
				}
				.nonewstext{
					font-size: 30rpx;
					color: #999999;
					text-align: center;
					margin-top: 20rpx;
				}
				.nonewsbtn{
					display: inline-block;
					padding: 8rpx 20rpx;
					background: #fd8080;
					color: white;
					border-radius: 6rpx;
					font-size: 22rpx;
					margin-top: 45rpx;
				}
			}
			
		}
		
	}
</style>
